package snake.common;

import snake.enums.GameState;
import snake.factory.FoodFactory;
import snake.model.Food;
import snake.model.Snake;

import javax.swing.*;

public class GameContext {

    public GameState state = GameState.NOT_STATE;
    public Integer level = 1;
    public Integer score = 0;

    public Snake snake = new Snake();
    public Food food = FoodFactory.getFood();
    private  Timer timer;

    public Snake getSnake() {
        return snake;
    }

    public void setSnake(Snake snake) {
        this.snake = snake;
    }

    public Food getFood() {
        return food;
    }

    public void setFood(Food food) {
        this.food = food;
    }

    public Timer getTimer() {
        return timer;
    }

    public void setTimer(Timer timer) {
        this.timer = timer;
    }

    public GameState getState() {
        return state;
    }

    public void setState(GameState state) {
        this.state = state;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public void increaseLevel(){
        this.level++;
    }

    public void increaseScore(){
        this.score++;
    }
}
